1. Field of the Invention
The present invention relates to an encoding apparatus and, more particularly, to an encoding apparatus, an encoding method, and a program for multiplexing a plurality of encoded streams.
2. Description of the Related Art
In recent years, making of products of video cameras for performing a high-definition recording by using a disk medium, a hard disk, or a memory as a storage medium has been started. It is considered that those video cameras will spread more and more in future because they are so small as to be easily carried and can record images of high image quality. In such apparatuses, in order to perform the high-definition recording, the image is stored into a recording medium as a video stream which has been compression-encoded by, for example, MPEG4 part-10: AVC (ISO/IEC 14496-10; another name, H.264). According to such a compression-encoding method, an inter-frame prediction (inter-prediction) using a correlation between images and an intra-frame prediction (intra-prediction) using a correlation within a frame are used and an arithmetic coding is also used, thereby realizing a high-efficient compression-encoding.
A video camera arranged such that left and right image signals are input to form a 3D image has also been put into practical use.
The Official Gazette of Japanese Patent Application Laid-Open No. H09-65372 discloses an apparatus for encoding and recording respective right and left images. This Official Gazette proposes such an apparatus that a code amount to be assigned when each image is encoded is adaptively set on a picture unit basis in accordance with a correlation between the right image and the left image, thereby making degrees of deterioration of encoding of the right and left images even.
In the case of encoding the right and left images like a related art mentioned above, it is an important subject to make image quality of the right image and that of the left image even. It is also important to suppress a deterioration in encoding of the right and left images as much as possible and maintain high image quality. Therefore, in order to more efficiently encode within limited bit rates, in addition to the conventional inter-frame prediction and arithmetic coding, a parallax prediction which makes it possible to predict one of the right and left images from the other is performed as a technique peculiar to a 3D image.
When the recording of the right and left images is started, if bit rates and buffer sizes are merely set and the encoding is performed, an encoding efficiency of the parallax prediction changes in accordance with a feature of the input image, so that degrees of deterioration of encoding of the right and left images differ. In the encoding apparatus in the related art, in such a case, unnaturalness as a 3D image is reduced by matching the degrees of deterioration of encoding of the right and left images with the larger one.
However, the encoding apparatus in the related art has such a problem that the set bit rates are not effectively used so that the image quality deteriorates.
In consideration of the above problems, it is an aspect of the invention to provide an encoding apparatus in which bit rates and buffer sizes regarding the encoding of right and left images are properly distributed at the start of recording, thereby preventing a deterioration in image quality and enabling the encoding to be efficiently performed.